package it.free.maya.worddistinct;

import java.util.List;

/**
 * Keep data for every word met
 * @author Stefano Falconetti
 */
public class Word {

	private int occurencesCounter = 0;
	private String word = null;
	private List<String> synonyms = null;
	
	/**
	 * Increase the number of occurences for this word
	 * @return
	 */
	public int increaseCounter(){
		this.occurencesCounter++;
		return this.occurencesCounter;
	}

	/**
	 * @return the word
	 */
	public String getWord() {
		return this.word;
	}

	/**
	 * @param word the word to set
	 */
	public void setWord(String word) {
		this.word = word;
	}

	/**
	 * @return the occurencesCounter
	 */
	public int getOccurencesCounter() {
		return this.occurencesCounter;
	}
	
	/**
	 * To String override
	 */
	@Override
	public String toString(){
		String msg = "[occ=" + this.occurencesCounter + ";word=" + this.word + ";syn=" + this.synonyms + "]";
		return msg;
	}

	/**
	 * @return the synonyms
	 */
	public List<String> getSynonyms() {
		return this.synonyms;
	}

	/**
	 * @param synonyms the synonyms to set
	 */
	public void setSynonyms(List<String> synonyms) {
		this.synonyms = synonyms;
	}
}
